From 64759116caee434bbc74e17464b786bf56d667a0 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 23 Sep 2004 05:45:17 +0000 Subject: [PATCH] Add --quick option to suppress display of diffs. --- maintenance/parserTests.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/maintenance/parserTests.php b/maintenance/parserTests.php index 012bfea4e1..20d666c22d 100644 --- a/maintenance/parserTests.php +++ b/maintenance/parserTests.php @@ -43,6 +43,12 @@ class ParserTest { } else { $this->color = true; } + + if( isset( $_SERVER['argv'] ) && in_array( '--quick', $_SERVER['argv'] ) ) { + $this->showDiffs = false; + } else { + $this->showDiffs = true; + } } function runTestsFromFile( $filename ) { @@ -172,9 +178,9 @@ class ParserTest { function showFailure( $desc, $result, $html ) { print $this->termColor( '1;31' ) . 'FAILED!' . $this->termReset() . "\n"; - #print "!! Expected:\n$result\n"; - #print "!! Received:\n$html\n!!\n"; - print $this->quickDiff( $result, $html ); + if( $this->showDiffs ) { + print $this->quickDiff( $result, $html ); + } return false; } -- 2.20.1